import http from '@/http';

export default {
	insert: {
		name: '增加角色',
		url: '/api/roles',
		call: async function (params: any = {}) {
			return await http.post(this.url, params);
		},
	},
	delete: {
		name: '删除角色',
		url: '/api/roles',
		call: async function (params: any = {}) {
			return await http.delete(this.url, params);
		},
	},
	update: {
		name: '修改角色',
		url: '/api/roles',
		call: async function (params: any = {}) {
			return await http.put(this.url, params);
		},
	},
	select: {
		name: '查询角色',
		url: '/api/roles',
		call: async function (params: any = {}) {
			return await http.get(this.url, params);
		},
	},
	editPermission: {
		name: '修改角色权限',
		url: '/api/roles/editPermission',
		call: async function (params: any = {}) {
			return await http.post(this.url, params);
		},
	},
};